#pragma once
#include <emmintrin.h>
class MMXTest
{
public:
	MMXTest(void);
	~MMXTest(void);
	CString MMXExample1(CImage image);
	CString MMXExample2(CImage image);
	CString MMXExample3(CImage image1,CImage image2);
	__int64 GetTimeNoOpt(void);
	__int64 GetTimeOpt(void);
private:
	void Example1Init(CImage image);
	void Example8Init(CImage image);
	void Example8Init2(CImage image);
	void InvertImageCPlusPlus(BYTE* pSource,BYTE* pDest,int nNumberOfPixels);
	void InvertImageC_MMX(BYTE* pSource,BYTE* pDest,int nNumberOfPixels);
	void ColorsCPlusPlus(BYTE* pSource, BYTE* pDest, int nNumberOfPixels, 
        float fRedCoefficient, float fGreenCoefficient, float fBlueCoefficient);
	void ColorsC_MMX(BYTE* pSource, BYTE* pDest, int nNumberOfPixels, 
        float fRedCoefficient, float fGreenCoefficient, float fBlueCoefficient);
	void ConcatenateCPlusPlus(BYTE* pSource1,BYTE* psource2,BYTE* pDest);
	void Concatenate_MMX(BYTE* pSource1,BYTE* psource2,BYTE* pDest);
	__m64 Get_m64(__int64 n);
	CImage m_Image,m_Image2;
	BYTE* m_pImageBits;
	BYTE* m_pInitialImage,*m_pInitialImage2;
	__int64 TimeNoOpt;
	__int64 TimeOpt;
};

